<!--
  Generated template for the DeviceSelectPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>充电设备选择</ion-title>
  </ion-navbar>

</ion-header>


<ion-content padding class="device-select">
  <div class="device-module">
    <h5 class="device-group-name">{{site.charging_pile_name}}</h5><span class="tle">(蓝色可充电)</span>
    <div class="device-message">
      <!-- 充电设备 -->
<!--<button *ngFor="let c of charging_unit_List " ion-button [ngClass]="{true: 'button-device device-free', false: 'button-device device-off'}[c.switchBle]" class="" (click)="skipToTimeSelect(c)">{{c.power_index}}</button>-->
     
<!--<div  *ngFor="let c of charging_unit_List"  class="con">
		<button ion-button class="blue" *ngIf="c.switchBle==true" (click)="skipToTimeSelect(c)">{{c.power_index}}</button>
	 	<button ion-button class="gray" *ngIf="(c.switchBle==false&&c.discharge_status==='') || (c.switchBle==false&&c.discharge_status==='1')" (click)="skipToTimeSelect(c)">{{c.power_index}}</button>
	 	<div class="loading" *ngIf="c.switchBle==false&&c.use_status==='1'" (click)="skipToTimeSelect(c)">
	    	<span class="num">{{c.power_index}}</span>
	    	<span class="scr"></span>
	    	<span class="scr"></span>
        <span class="scr"></span>
        <span class="scr"></span>
		</div>
</div>-->

<div class="box"  *ngFor="let c of charging_unit_List">
 <div class="device-box" *ngIf="c.switchBle==true" (click)="skipToTimeSelect(c)">
 		<ion-range  [(ngModel)]="maxVal" min="0" max="{{max}}" pin="true" disabled="disabled"></ion-range>
 		<!--<span class="spanR">{{c.switchBle}}-{{c.chargingtime}}-{{c.chargingtimerequest}}</span>-->
 		<span class="spanR">{{c.power_index}}</span>
 </div>
 <div class="device-box" *ngIf="(c.switchBle==false&&c.discharge_status==='') || (c.switchBle==false&&c.discharge_status==='1')" (click)="skipToTimeSelect(c)">
 		<ion-range  [(ngModel)]="minValue" min="0" max="{{max}}" pin="true" disabled="disabled"></ion-range>
 		<!--<span class="spanR">{{c.switchBle}}={{c.chargingtime}}={{c.chargingtimerequest}}={{c.power_index}}</span>-->
 		<span class="spanR">{{c.power_index}}</span>
 </div>
  <div class="device-box" *ngIf="c.switchBle==false&&c.use_status==='1'" (click)="skipToTimeSelect(c)">
 		<ion-range  [(ngModel)]="c.chargingtime" min="0" max="{{c.chargingtimerequest}}" pin="true" disabled="disabled"></ion-range>
 		<!--<span class="spanR">{{c.switchBle}}-{{c.chargingtime}}-{{c.chargingtimerequest}}</span>-->
 		<span class="spanR">{{c.power_index}}</span>
 </div>
</div>
         
      <!--<button ion-button outline class="button-device device-free"  (click)="skipToTimeSelect()">2</button>
      <button ion-button         class="button-device device-selected">3</button>
      <button ion-button outline class="button-device device-free"  (click)="skipToTimeSelect()">4</button>

      <button ion-button outline class="button-device device-free"  (click)="skipToTimeSelect()">5</button>
      <button ion-button outline class="button-device device-free"  (click)="skipToTimeSelect()">6</button>
      <button ion-button outline class="button-device device-free"  (click)="skipToTimeSelect()">7</button>
      <button ion-button outline class="button-device device-free"  (click)="skipToTimeSelect()">8</button>

      <button ion-button  class="button-device device-disabled">9</button>
      <button ion-button  class="button-device device-disabled">10</button>
      <button ion-button  class="button-device device-free">11</button>
      <button ion-button  class="button-device device-disabled">12</button>-->

    </div>
  </div>
  <button class="button-device device-free refresh" (click)="refreshScan()">刷新设备</button>


</ion-content>